package com.open.system.dispatch.impl;

import com.open.system.dispatch.IUserRoleDispatch;
import com.open.common.model.Page;
import com.open.system.model.UserRole;
import com.open.system.service.IUserRoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 菜单信息
 *
 * @author 大树03
 * @date 2025-02-16 21:27
 */
@Component(value="userRoleDispatch")
@Slf4j
public class UserRoleDispatchImpl implements IUserRoleDispatch{

	private IUserRoleService userRoleService;

    @Autowired
	public void setUserRoleService(IUserRoleService userRoleService) {
		this.userRoleService = userRoleService;
	}

	@Override
	public Boolean save(UserRole model)  {
		return userRoleService.save(model);
	}

	@Override
	public Boolean update(UserRole model)  {
		return userRoleService.update(model);
	}

	@Override
	public Page<UserRole> findPage(Page<UserRole> page,UserRole item)  {
		return userRoleService.findPage(page,item);
	}
	
	@Override
	public List<UserRole> findByUserId(Long pk) {
		return userRoleService.findByUserId(pk);
	}

	@Override
    public List<UserRole> findByModel(UserRole model)  {
		return userRoleService.findByModel(model);
	}

	@Override
	public Boolean removeByUserId(List<Long> pks) {
		return userRoleService.removeByUserId(pks);
	}
}